﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using T.FAS.Runtime.DataAccess.SPI;
using T.FAS.Runtime.DataAccess.ShardingRule;
using T.FAS.Runtime.Metadata.Entity.DataModel;

namespace T.FAS.Runtime.DataAccess.SPI
{
    /// <summary>
    /// 数据更新服务接口
    /// </summary>
    public interface IDataUpdateService
    {
        /// <summary>
        /// 保存领域模型数据
        /// </summary>
        /// <param name="CompositeDataObject">领域模型</param>
        /// <param name="instance">对象实例</param>
        /// <param name="shardingValue">分区分表键值对</param>
        void Update(CompositeDataObject CompositeDataObject, object instance, ShardingValue shardingValue = null);

        /// <summary>
        /// 保存领域模型数据
        /// </summary>
        /// <param name="CompositeDataObject">领域模型</param>
        /// <param name="CompositeNodeObject">领域对象</param>
        /// <param name="instance">对象实例</param>
        /// <param name="shardingValue">分区分表键值对</param>
        void Update(CompositeDataObject CompositeDataObject, CompositeNodeObject CompositeNodeObject, object instance, ShardingValue shardingValue = null);
    }
}
